Ext.define('SKJF.view.MASTER.v_msthscode_form', {
	extend	: 'Ext.form.Panel',
	
	alias	: 'widget.v_msthscode_form',
	
	//region:'east',
	//id: 'east-region-container',
	
	title		: 'Create/Update msthscode',
    bodyPadding	: 5,
    autoScroll	: true,
    
    initComponent: function(){
    	/*
		 * Deklarasi variable setiap field
		 */
		 
		var HSCODE_field = Ext.create('Ext.form.field.Text', {
			itemId: 'HSCODE_field',
			name: 'HSCODE', /* column name of table */
			fieldLabel: 'HSCODE',
			allowBlank: false /* jika primary_key */,
			maxLength: 20 /* length of column name */
		});
		var HSCODE_DETAIL_field = Ext.create('Ext.form.field.Text', {
			itemId: 'HSCODE_DETAIL_field',
			name: 'HSCODE_DETAIL', /* column name of table */
			fieldLabel: 'HSCODE_DETAIL',
			allowBlank: false /* jika primary_key */,
			maxLength: 20 /* length of column name */
		});
		var URAIAN_BARANG_field = Ext.create('Ext.form.field.Text', {
			name: 'URAIAN_BARANG', /* column name of table */
			fieldLabel: 'URAIAN_BARANG',
			maxLength: 50 /* length of column name */
		});
		var DESKRIPSI_BARANG_field = Ext.create('Ext.form.field.Text', {
			name: 'DESKRIPSI_BARANG', /* column name of table */
			fieldLabel: 'DESKRIPSI_BARANG',
			maxLength: 50 /* length of column name */
		});
		var BEA_MASUK_NORMAL_field = Ext.create('Ext.form.field.Number', {
			name: 'BEA_MASUK_NORMAL', /* column name of table */
			fieldLabel: 'BEA_MASUK_NORMAL',
			maxLength: 11 /* length of column name */
		});
		var BEA_MASUK_FTA_CHINA_field = Ext.create('Ext.form.field.Number', {
			name: 'BEA_MASUK_FTA_CHINA', /* column name of table */
			fieldLabel: 'BEA_MASUK_FTA_CHINA',
			maxLength: 11 /* length of column name */
		});
		var BEA_MASUK_FTA_INDIA_field = Ext.create('Ext.form.field.Number', {
			name: 'BEA_MASUK_FTA_INDIA', /* column name of table */
			fieldLabel: 'BEA_MASUK_FTA_INDIA',
			maxLength: 11 /* length of column name */
		});
		var BEA_MASUK_FASILITAS_C_field = Ext.create('Ext.form.field.Number', {
			name: 'BEA_MASUK_FASILITAS_C', /* column name of table */
			fieldLabel: 'BEA_MASUK_FASILITAS_C',
			maxLength: 11 /* length of column name */
		});
		var BEA_MASUK_FASILITAS_D_field = Ext.create('Ext.form.field.Number', {
			name: 'BEA_MASUK_FASILITAS_D', /* column name of table */
			fieldLabel: 'BEA_MASUK_FASILITAS_D',
			maxLength: 11 /* length of column name */
		});
		var BEA_MASUK_FASILITAS_E_field = Ext.create('Ext.form.field.Number', {
			name: 'BEA_MASUK_FASILITAS_E', /* column name of table */
			fieldLabel: 'BEA_MASUK_FASILITAS_E',
			maxLength: 11 /* length of column name */
		});
		var PPN_field = Ext.create('Ext.form.field.Number', {
			name: 'PPN', /* column name of table */
			fieldLabel: 'PPN',
			maxLength: 11 /* length of column name */
		});
		var PPh_22_IMPORT_field = Ext.create('Ext.form.field.Number', {
			name: 'PPh_22_IMPORT', /* column name of table */
			fieldLabel: 'PPh_22_IMPORT',
			maxLength: 11 /* length of column name */
		});
		var KETERANGAN_field = Ext.create('Ext.form.field.Text', {
			name: 'KETERANGAN', /* column name of table */
			fieldLabel: 'KETERANGAN',
			maxLength: 50 /* length of column name */
		});		
        Ext.apply(this, {
            fieldDefaults: {
                labelAlign: 'left',
                labelWidth: 185,
                msgTarget: 'qtip',
				anchor: '100%'
            },
			defaultType: 'textfield',
            items: [HSCODE_field,HSCODE_DETAIL_field,URAIAN_BARANG_field,DESKRIPSI_BARANG_field,BEA_MASUK_NORMAL_field,BEA_MASUK_FTA_CHINA_field,BEA_MASUK_FTA_INDIA_field,BEA_MASUK_FASILITAS_C_field,BEA_MASUK_FASILITAS_D_field,BEA_MASUK_FASILITAS_E_field,PPN_field,PPh_22_IMPORT_field,KETERANGAN_field],
			
	        buttons: [{
                iconCls: 'icon-save',
                itemId: 'save',
                text: 'Save',
                disabled: true,
                action: 'save'
            }, {
                iconCls: 'icon-add',
				itemId: 'create',
                text: 'Create',
                action: 'create'
            }, {
                iconCls: 'icon-reset',
                text: 'Cancel',
                action: 'cancel'
            }]
        });
        
        this.callParent();
    }
});